#ifndef __stack__
#define __stack__
#endif

class Stack
{
public:
	Stack();
	Stack( size_t size );
	Stack( const Stack& );
	~Stack();
	Stack& operator=( const Stack& );
	size_t size();
	void push( int v );
	int pop();
	bool empty();
private:
	size_t _size;
	size_t _top;
	int* _data;

	void extendOnDemand();
};

class StackEmptyException
{
public:
	StackEmptyException() {}
};
